import 'package:flutter/material.dart';
import 'package:flutter_create_framework/util/screen_util.dart';

AppBar MyAppbar(BuildContext context,{bool showBack = false}){
  return AppBar(
    title: Row(
      mainAxisSize: MainAxisSize.min,
      crossAxisAlignment: CrossAxisAlignment.center,
      children: [
        Image.asset("assets/images/yuque.png",width: Pxw(context, 40),height: Pxh(context, 40),),
        SizedBox(width: Pxw(context, 5),),
        Text("语雀",style: TextStyle(fontSize: Pxsp(context, 16)),)
      ],
    ),
    leading: showBack?IconButton(icon: Icon(Icons.chevron_left,size: Pxw(context, 26),), onPressed: (){Navigator.of(context).pop();}):null,
  );
}
